package com.otaku.admin.util;

/**
 * 字符串类型常量
 */
public class StringTypeConstant {

    /**
     * 密匙
     */
    public static final String SECRET_TOKEN = "zhangsanABC";
    /**
     * redis token title
     */
    public static final String REDIS_TOKEN_TITLE = "token-title:";
    /**
     * 刷新token标识符
     */
    public static final String REFRESH_TOKEN_REQUEST = "REFRESH_TOKEN_REQUEST";
    /**
     * 权限类型
     * 1.目录 Catalog
     * 2.页面 page
     * 3.按钮 button
     */
    public static final String PERM_TYPE_CATALOG = "CATALOG";
    public static final String PERM_TYPE_PAGE = "PAGE";
    public static final String PERM_TYPE_BUTTON = "BUTTON";

    /**
     * 分页属性校验参数
     */
    public static final String CHECK_PARAM_PAGE = "page";
    /**
     * 起始页参数名
     */
    public static final String CHECK_PARAM_PAGE_CURRENT = "page.current";
    /**
     * 起始页默认值
     */
    public static final String CHECK_PARAM_PAGE_CURRENT_VALUE = "1";
    /**
     * 页数参数名
     */
    public static final String CHECK_PARAM_PAGE_SIZE = "page.size";
    /**
     * 页数默认值
     */
    public static final String CHECK_PARAM_PAGE_SIZE_VALUE = "10";
    /**
     * 获取redis token title
     *
     * @param values
     * @return
     */
    public static String getRedisTokenTitles(String values) {
        StringBuffer buffer = new StringBuffer(REDIS_TOKEN_TITLE);
        buffer.append(values);
        return buffer.toString();
    }

}
